home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000652_timbl@www3.cern.ch _Thu Feb 11 18:42:35 1993.msg < prev    next >
Internet Message Format  |  1994-01-24  |  4KB

  1. Return-Path: <timbl@www3.cern.ch>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA15075; Thu, 11 Feb 93 18:42:35 MET
  4. Received: from www3.cern.ch by dxmint.cern.ch (5.65/DEC-Ultrix/4.3)
  5.     id AA07306; Thu, 11 Feb 1993 18:58:45 +0100
  6. Received: by www3.cern.ch (NX5.67c/NX3.0S)
  7.     id AA05809; Thu, 11 Feb 93 18:55:44 +0100
  8. Date: Thu, 11 Feb 93 18:55:44 +0100
  9. From: Tim Berners-Lee <timbl@www3.cern.ch>
  10. Message-Id: <9302111755.AA05809@www3.cern.ch>
  11. Received: by NeXT.Mailer (1.87.1)
  12. Received: by NeXT Mailer (1.87.1)
  13. To: www-talk@nxoc01.cern.ch
  14. Subject: libWWW: New architecture
  15. Reply-To: timbl@nxoc01.cern.ch
  16.  
  17.  
  18.  
  19. I am testing out the new library (2.alpha?) which has a lot of
  20. new features largely as a result comment on this list (many from
  21. Dan Connoly, but also others). So I thought I'd bounce the end result  
  22. off you all as to check it for stupidities.
  23.  
  24. The driving forces are putting in MIME, and allowing the library
  25. to be used by disparate browsers and editors and servers without
  26. modification.
  27.  
  28. The thing is still all portable C but even more OO in style. Two new  
  29. objects are HTStream which is something you can write to .. it  
  30. supports
  31.  
  32.     put_character
  33.     put_string
  34.     write     /* buffer */
  35.     end
  36.     free
  37.  
  38. Some of the machinery works character by character
  39. (state machine parsers) but it's useful to have faster methods when
  40. there is no characterwise intervention.
  41.  
  42. This is to allow MIME encoding pipelines to be built, as well as the
  43. existing facilities to be more flexible.  Streams stack, and freeing
  44. the top of the stack frees off the stack.  As a side issue the stream
  45. idea allows the difference between sockets and FILE * to be overcome
  46. cleanly without the hacks necessary on some systems which shall be  
  47. nameless. Streams subclasses exist to
  48.  
  49.     write to a FILE *
  50.     write to a socket
  51.     parse an SGML file of (dtd)
  52.         pushing the results into (structured)
  53.     convert plain text to valid HTML -> other stream
  54.     format a (structured) described by (dtd) as plain text
  55.         pushing the results -> other stream
  56.     parse a MIME document (to come)
  57.  
  58. There is a different creation routine for each case.
  59. The "structured" object is a subclass of HTStream called  
  60. HTStructured. It is a sort of rich stream, accepting also the methods
  61.  
  62.     start_element(element_number, attributes)
  63.     end_element(elemenet_number)
  64.     put_entity(entity_number)
  65.  
  66. Obviously an HTStructured thing has a pointer to a DTD structure
  67. so that the element numbers and entity numbers make sense.
  68. Elements and entities are passed around as numbers so that the
  69. string lookup is only done once if at all.
  70.  
  71. Structued subclasses objects exist to
  72.  
  73.     Pretty-print structued text to plain text stream
  74.     Generate SGML for the stream, given its DTD
  75.     Present the structured object to the user
  76.  
  77. This last one is the one you browser writers hook into
  78. and it should be alot easier than tangling with styles.
  79.  
  80. You can also of course regenerate the stream from your
  81. widget and use the HTML generator structured object
  82. to write your file back to the server. (Thisis to
  83. encourage more hypertext editors out there!)
  84.  
  85. There is another class of object called a protocol.
  86. It supports GET and will soon support PUT and other
  87. useful things.  Current subclasses handle
  88.  
  89.     http
  90.     news
  91.     gopher
  92.     files and directories
  93.     FTP files and directories
  94.     WAIS without gateway will come
  95.  
  96. Typically News and Gophe protocol
  97. objects ask for a HTStructured object (which may
  98. in fact go to a display, or a client if we are a server, or
  99. a file etc through a small stream stack) and build it.
  100. Although the structured object is defined by a DTD,
  101. and has an SGML model, there is no generation of SGML from
  102. news, etc within a browser for speed (unless the user wants
  103. to save something as SGML).
  104.  
  105. Other things .. a common interface for alerts, confirmation and  
  106. questions to the user from the bowels of the library,  and sometime a  
  107. spinning callback for geting out of
  108. those long timeouts..
  109.  
  110. Constructive criticism welcome, I'll put the code out
  111. when I can.
  112.  
  113. Tim Berners-Lee
  114.  
  115.  
  116.